import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'audio_spectrum_method_channel.dart';

abstract class AudioSpectrumPlatform extends PlatformInterface {
  AudioSpectrumPlatform() : super(token: _token);

  static final Object _token = Object();

  static AudioSpectrumPlatform _instance = MethodChannelAudioSpectrum();

  static AudioSpectrumPlatform get instance => _instance;

  static set instance(AudioSpectrumPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  listenMusicSpectrum(EventHandler onEvent, EventHandler onError) {}
  listenRecordSpectrum(EventHandler onEvent, EventHandler onError) {}

  getAudioSpectrum(String url);

  stopPlayer();

  startRecord();
  stopRecord();
}
